import React, { Component } from 'react'
import RouterView from '../../router/router-view'
import {RouteItem} from '../../router/router-config'
import {NavLink} from 'react-router-dom'
import './index.scss'

interface IProps{
    routes:RouteItem[]
}

export default class Main extends Component <IProps>{
    render() {
        return (
            <div className="main-wrap">
                <div className="con">
                    <RouterView routes={this.props.routes}></RouterView>
                </div>
                
                <footer className="foot">
                    <NavLink to="/main/home">首页</NavLink>
                    <NavLink to="/main/classify">分类</NavLink>
                    <NavLink to="/main/find">发现</NavLink>
                    <NavLink to="/main/car">购物车</NavLink>
                    <NavLink to="/main/my">我的</NavLink>
                </footer>
            </div>
        )
    }
}
